home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIPrintOptions.idl < prev    next >
Text File  |  2006-05-08  |  5KB  |  148 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 2000
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *   Don Cone <dcone@netscape.com>
  24.  *   Jessica Blanco <jblanco@us.ibm.com>
  25.  *
  26.  * Alternatively, the contents of this file may be used under the terms of
  27.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  28.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  29.  * in which case the provisions of the GPL or the LGPL are applicable instead
  30.  * of those above. If you wish to allow use of your version of this file only
  31.  * under the terms of either the GPL or the LGPL, and not to allow others to
  32.  * use your version of this file under the terms of the MPL, indicate your
  33.  * decision by deleting the provisions above and replace them with the notice
  34.  * and other provisions required by the GPL or the LGPL. If you do not delete
  35.  * the provisions above, a recipient may use your version of this file under
  36.  * the terms of any one of the MPL, the GPL or the LGPL.
  37.  *
  38.  * ***** END LICENSE BLOCK ***** */
  39.  
  40. #include "nsISupports.idl"
  41. #include "nsIPrintSettings.idl"
  42.  
  43. %{ C++
  44. #include "nsFont.h"
  45. %}
  46.  
  47. interface nsISimpleEnumerator;
  48.  
  49. /**
  50.  * Native types
  51.  */
  52.   [ref] native nsNativeFontRef(nsFont);
  53.   [ref] native nsNativeStringRef(nsString);
  54.  
  55. /**
  56.  * Print options interface
  57.  *
  58.  * Do not attempt to freeze this API - it still needs lots of work. Consult
  59.  * John Keiser <jkeiser@netscape.com> and Roland Mainz
  60.  * <roland.mainz@informatik.med.uni-giessen.de> for futher details.
  61.  */
  62. [scriptable, uuid(d9948a4d-f49c-4456-938a-acda2c8d7741)]
  63.  
  64. interface nsIPrintOptions : nsISupports
  65. {
  66.   /**
  67.    * Show Native Print Options dialog, this may not be supported on all platforms
  68.    */
  69.   void ShowPrintSetupDialog(in nsIPrintSettings aThePrintSettings);
  70.  
  71.   /**
  72.    * Creates a new PrintSettnigs Object
  73.    * and initializes it from prefs
  74.    */
  75.   nsIPrintSettings CreatePrintSettings();
  76.  
  77.   /**
  78.    * available Printers
  79.    * It returns an enumerator object or throws an exception on error cases
  80.    * like if internal setup failed and/or no printers are available.
  81.    */
  82.   nsISimpleEnumerator availablePrinters ();
  83.  
  84.   /**
  85.    * Get a prefixed integer pref 
  86.    */
  87.   PRInt32 getPrinterPrefInt(in nsIPrintSettings aPrintSettings, in wstring
  88.                             aPrefName);
  89.  
  90.   /**
  91.    * display Printer Job Properties dialog
  92.    */
  93.   void displayJobProperties (in wstring aPrinter, in nsIPrintSettings
  94.                              aPrintSettings, out boolean aDisplayed);
  95.  
  96.  
  97.   void setFontNamePointSize(in AString aName, in PRInt32 aPointSize);
  98.   // no script methods
  99.   [noscript] void SetDefaultFont(in nsNativeFontRef aFont);
  100.   /* Purposely made this an "in" arg */
  101.   [noscript] void GetDefaultFont(in nsNativeFontRef aFont);
  102.  
  103.   /**
  104.    * Native data constants
  105.    */
  106.   const short kNativeDataPrintRecord        = 0;
  107.  
  108.   [noscript] voidPtr GetNativeData(in short aDataType);
  109. };
  110.  
  111. [scriptable, uuid(a6cf9128-15b3-11d2-932e-00805f8add32)]
  112.  
  113. interface nsIPrinterEnumerator : nsISupports
  114. {
  115.   /**
  116.    * The name of the default printer 
  117.    * This name must be in the list of printer names returned by
  118.    * "availablePrinters"
  119.    * 
  120.    */
  121.   readonly attribute wstring defaultPrinterName;
  122.  
  123.   /**
  124.    * Initializes certain settings from the native printer into the PrintSettings
  125.    * These settings include, but are not limited to:
  126.    *   Page Orientation
  127.    *   Page Size
  128.    *   Number of Copies
  129.    */
  130.   void initPrintSettingsFromPrinter(in wstring aPrinterName, in nsIPrintSettings aPrintSettings);
  131.  
  132.   /**
  133.    * Returns an array of the names of all installed printers.
  134.    *
  135.    * @param  aCount     returns number of printers returned
  136.    * @param  aResult    returns array of names
  137.    * @return void
  138.    */
  139.   void enumeratePrinters(out PRUint32 aCount,[retval, array, size_is(aCount)] out wstring aResult);
  140.  
  141.   /*  takes printer selected and will display job properties dlg for that printer
  142.    *  returns true if dialog displays
  143.    */
  144.   void displayPropertiesDlg(in wstring aPrinter, in nsIPrintSettings aPrintSettings);
  145.  
  146. };
  147.  
  148.